package web.demos.web.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import web.demos.web.domain.po.Student;
import web.demos.web.service.IStudentService;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author k
 * @since 2024-05-11
 */
@RestController
@RequestMapping("/student")
@Api(tags = "webservice测试接口")
public class StudentController {

    @Autowired
    private IStudentService  IStudentService;

    @GetMapping("/getStudent")
    @ApiOperation("webservice测试接口")
    public Student getStudent(){
        return IStudentService.getStudent();
    }

    @GetMapping("/getAllStudent")
    @ApiOperation("webservice测试接口")
    public List<Student> getAllStudent(){
        return IStudentService.getAllStudent();
    }
}
